<?php if (!defined('THINK_PATH')) exit();if(is_array($parenterm)): $i = 0; $__LIST__ = $parenterm;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$data): $mod = ($i % 2 );++$i;?>

<tr id="node_<?php echo $data['id']; ?>" class="parent_id_<?php echo $data['parent_id']; ?>">
    <td>
        <input name="listorder[<?php echo $data['id']; ?>]" class="listorder"  type="text" data-orderid="<?php echo $data['id']; ?>"
               value="<?php echo $data['listorder']; ?>" style="border:1px solid #3C8DBC;background:none;text-align: center" />
    </td>
    <td style="text-align: left"><?php echo $data['id']; ?></td>
    <td id="term_id_<?php echo $data['id']; ?>" class="<?php echo $a = D('term')->hasChild($data['id'])?'hasChild':''; ?>">
        <?php  $countpath = D('Term')->depth($data['parent_id']); $path = (count(array_unique($countpath))); 
        $str= '';
        for($i=0;$i<$path;$i++)
            {
                $str.="&nbsp;&nbsp;&nbsp;";
            }
        echo $str;
         echo $a ? '<img src="__ADMINLTE__dist/img/colum1nx.gif" id="term_img_'.$data["id"].'" />' : '<span style="width:12px;display: inline-block;"></span>'; echo $data['name']; ?>
    </td>
    <td><?php echo $modelList[$data['model_id']]; ?></td>
    <td>
        <?php if(( $data['display_nav'] == 1)): ?>
        显示<?php else: ?>不显示
        <?php endif; ?>
    </td>
    <td>
        
        <a href="<?php echo U('Term/editTerm',array('id'=>$data['id'])); ?>">修改|</a>
        <a href="<?php echo U('Term/delTerm',array('id'=>$data['id'])); ?>">删除|</a>
		<a href="<?php echo U('Term/addTerm',array('model_id'=>$data['model_id'],'parent_id'=>$data['id'])); ?>">添加子栏目|</a>
        <!-- 新闻 -->
        <a href="<?php echo U('Content/index',array('term_id'=>$data['id'],'model_id'=>$data['model_id'])); ?>">
            <?php $find_add_term = in_array($data['id'],$result); echo !empty($find_add_term)?'' : "查看列表"; ?>
        </a>

    </td>

</tr>
<?php endforeach; endif; else: echo "" ;endif; ?>